package com.sg.service.base.app.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.base.app.req.*;
import com.sg.entity.OmsEvaluationObjectTargetCycle;
import com.sg.service.base.app.MOmsEvaluationObjectTargetCycleService;
import com.wicket.okrapp.common.dto.FieldInfo;
import com.wicket.okrapp.common.exception.BizException;
import com.wicket.okrapp.dal.mapper.mbg.OmsEvaluationObjectTargetCycleMapper;
import com.wicket.okrframework.common.annotations.BanAuto;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @since 2022/1/19 15:39
 */
@Service
public class MOmsEvaluationObjectTargetCycleServiceImpl
        extends ServiceImpl<OmsEvaluationObjectTargetCycleMapper, OmsEvaluationObjectTargetCycle>
        implements MOmsEvaluationObjectTargetCycleService {

    @Autowired
    OmsEvaluationObjectTargetCycleMapper omsEvaluationObjectTargetCycleMapper;

    /**
     * 3-3-09批量增被评对象目标周期[2494]
     * gen by moon at 10/16/2022, 7:12:58 AM
     */
    @Trace(operationName = "3-3-09批量增被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchAddEvaObjTargetCycle(List<OmsEvaluationObjectTargetCycle> omsEvaluationObjectTargetCycle) {

        if (omsEvaluationObjectTargetCycle == null || omsEvaluationObjectTargetCycle.size() == 0) {
            return false;
        }

        return super.saveBatch(omsEvaluationObjectTargetCycle.stream().map(item -> {
            item.setEvaObjTargetCycleId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
            item.setBatchEndtTime(CommonFunctionHelper.getFutureTime());//FUTURE_CURRENT_TIME
            item.setIsUpdate("TRUE");
            item.setUpdateStatus("NEW");
            item.setArchivngType("NOT_ARCHIVE");
            item.setIsEditing("TRUE");
            item.setIsArchive("FALSE");
            item.setSubjectLifeCycle("EDITING");
            item.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
            item.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
            item.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
            item.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
            item.setIsValid("FALSE");
            item.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            item.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            return item;
        }).collect(Collectors.toList()));
    }

    /**
     * 3-3-09批量查评价对象匹配目标周期（by评价对象）[2406]
     * gen by moon at 10/16/2022, 7:12:57 AM
     */
    @Trace(operationName = "3-3-09批量查评价对象匹配目标周期（by评价对象）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjMatchTargetCycle(BatchQueryEvaObjMatchTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaObjMatchTargetCycleList() == null || reqDto.getEvaObjMatchTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("evaluation_object_id", reqDto.getEvaObjMatchTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }


    /**
     * M第二层循环开始新增部门目标任务书（特殊方法）
     */
    @Trace(operationName = "M第二层循环开始新增部门目标任务书（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean addStartCycle(List<OmsEvaluationObjectTargetCycle> omsEvaluationObjectTargetCycle) {

        if (omsEvaluationObjectTargetCycle == null || omsEvaluationObjectTargetCycle.size() == 0) {
            return false;
        }

        return super.saveBatch(omsEvaluationObjectTargetCycle.stream().map(item -> {

            return item;
        }).collect(Collectors.toList()));
    }

    /**
     * 3-3-09查被评对象目标周期节点列表[2347]
     * gen by moon at 10/16/2022, 7:12:56 AM
     */
    @Trace(operationName = "3-3-09查被评对象目标周期节点列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaObjTargetCycleCodeList(QueryEvaObjTargetCycleCodeListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查被评对象目标周期列表[2335]
     * gen by moon at 12/11/2022, 4:02:26 AM
     */
    @Trace(operationName = "3-3-09批量查被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycle(BatchQueryEvaObjTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_target_cycle_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09修改被评对象目标周期[2317]
     * gen by moon at 10/16/2022, 7:12:54 AM
     */
    @Trace(operationName = "3-3-09修改被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateEvaObjTargetCycle(OmsEvaluationObjectTargetCycle omsEvaluationObjectTargetCycle) {

        return super.updateById(omsEvaluationObjectTargetCycle);
    }

    /**
     * 3-3-09新增被评对象目标周期[2314]
     * gen by moon at 11/20/2022, 12:54:38 PM
     */
    @Trace(operationName = "3-3-09新增被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public String addEvaObjTargetCycle(OmsEvaluationObjectTargetCycle omsEvaluationObjectTargetCycle) {
        omsEvaluationObjectTargetCycle.setEvaObjTargetCycleId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
        omsEvaluationObjectTargetCycle.setBatchEndtTime(CommonFunctionHelper.getFutureTime());//FUTURE_CURRENT_TIME
        omsEvaluationObjectTargetCycle.setIsUpdate("TRUE");
        omsEvaluationObjectTargetCycle.setUpdateStatus("NEW");
        omsEvaluationObjectTargetCycle.setArchivngType("NOT_ARCHIVE");
        omsEvaluationObjectTargetCycle.setIsEditing("TRUE");
        omsEvaluationObjectTargetCycle.setIsArchive("FALSE");
        omsEvaluationObjectTargetCycle.setSubjectLifeCycle("EDITING");
        omsEvaluationObjectTargetCycle.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        omsEvaluationObjectTargetCycle.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        omsEvaluationObjectTargetCycle.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        omsEvaluationObjectTargetCycle.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        omsEvaluationObjectTargetCycle.setIsValid("FALSE");
        omsEvaluationObjectTargetCycle.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
        omsEvaluationObjectTargetCycle.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
        if (super.save(omsEvaluationObjectTargetCycle)) {
            return omsEvaluationObjectTargetCycle.getEvaObjTargetCycleId();
        } else {
            return "-1";
        }

    }

    /**
     * 3-3-09查被评对象目标周期详情[2313]
     * gen by moon at 9/7/2022, 3:56:07 PM
     */
    @Trace(operationName = "3-3-09查被评对象目标周期详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @BanAuto
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjTargetCycleDetail(QueryEvaObjTargetCycleDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            if (reqDto.getCycleStartTime() != null || reqDto.getCycleEndTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.ge("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查指标观测点列表
     */
    @Trace(operationName = "3-3-09批量查指标观测点列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class, noRollbackFor = BizException.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryIndexViewPointList(BatchQueryIndexViewPointListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if (reqDto.getIndexViewPointList() == null || reqDto.getIndexViewPointList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getIndexViewPointList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查内容匹配被评对象目标周期（by目标周期内容ID）[2204]
     * gen by moon at 10/16/2022, 7:12:50 AM
     */
    @Trace(operationName = "3-3-09批量查内容匹配被评对象目标周期（by目标周期内容ID）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryContMatchEvaObjTargetCycleListByIds(BatchQueryContMatchEvaObjTargetCycleListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("sort_create_time");
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查主题类型匹配被评对象目标周期（by评价主题类型）[2193]
     * gen by moon at 10/16/2022, 7:12:49 AM
     */
    @Trace(operationName = "3-3-09批量查主题类型匹配被评对象目标周期（by评价主题类型）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQuerySubjTypeEvaObjTargetCycle(BatchQuerySubjTypeEvaObjTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaSubjectTypeList() == null || reqDto.getEvaSubjectTypeList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("evaluation_subject_type_code", reqDto.getEvaSubjectTypeList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("sort_create_time");
            queryWrapper.orderByAsc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查被评对象目标周期列表（根据周期时间范围）[2190]
     * gen by moon at 11/23/2022, 10:26:56 PM
     */
    @Trace(operationName = "3-3-09查被评对象目标周期列表（根据周期时间范围）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaObjTargetCycleList(QueryEvaObjTargetCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
// TODO: 2024/2/17  
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.ge("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.le("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByDesc("sort_create_time");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查被评对象目标周期汇报排序列表[2625]
     * gen by moon at 5/8/2025, 8:52:09 PM
     */
    @Trace(operationName = "3-3-09查被评对象目标周期汇报排序列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaObjTargetCycleReportSortList(QueryEvaObjTargetCycleReportSortListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("target_tree_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M-接受参数入参（特殊方法）
     */
    @Override
    @Transactional(rollbackFor = Exception.class, noRollbackFor = BizException.class)
    public String addAcceptParameters(OmsEvaluationObjectTargetCycle omsEvaluationObjectTargetCycle) {

        if (super.save(omsEvaluationObjectTargetCycle)) {
            return omsEvaluationObjectTargetCycle.getEvaObjTargetCycleId();
        } else {
            return "-1";
        }

    }

    /**
     * 3-3-09批量查被评对象目标周期By内容表主键id
     */
    @Override
    @Transactional(rollbackFor = Exception.class, noRollbackFor = BizException.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleByEntityId(BatchQueryEvaObjTargetCycleByEntityIdReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_entity_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量删被评对象目标周期[2615]
     * gen by moon at 10/16/2022, 7:12:59 AM
     */
    @Trace(operationName = "3-3-09批量删被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchDeleteEvaObjTargetCycle(List<String> reqDto) {

        if (reqDto == null || reqDto.size() == 0) {
            return false;
        }

        return super.removeByIds(reqDto);
    }

    /**
     * 3-3-09批量查被评对象目标周期By来自内容表主键id[2811]
     * gen by moon at 10/16/2022, 7:13:04 AM
     */
    @Trace(operationName = "3-3-09批量查被评对象目标周期By来自内容表主键id")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleByFromEntityId(BatchQueryEvaObjTargetCycleByFromEntityIdReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查被评对象目标周期By被评内容表主键id[2750]
     * gen by moon at 10/16/2022, 7:13:03 AM
     */
    @Trace(operationName = "3-3-09批量查被评对象目标周期By被评内容表主键id")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleByEvaEntityId(BatchQueryEvaObjTargetCycleByEvaEntityIdReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_entity_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 修改接受参数
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle updateAcceptParameters() {
        return null; //todo ruizhe dong
    }

    /**
     * 3-3-09批量查建设任务观测点[2227]
     * gen by moon at 5/8/2025, 8:52:07 PM
     */
    @Trace(operationName = "3-3-09批量查建设任务观测点")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryBuildTaskIndexViewPoint(BatchQueryBuildTaskIndexViewPointReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if (reqDto.getIndexViewPointList() == null || reqDto.getIndexViewPointList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getIndexViewPointList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("target_tree_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09-01批量改被评对象目标周期[2664]
     * gen by moon at 10/16/2022, 7:13:02 AM
     */
    @Trace(operationName = "3-3-09-01批量改被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchUpdateEvaObjTargetCycle(List<OmsEvaluationObjectTargetCycle> omsEvaluationObjectTargetCycle) {

        if (omsEvaluationObjectTargetCycle == null || omsEvaluationObjectTargetCycle.size() == 0) {
            return false;
        }
        return super.saveOrUpdateBatch(omsEvaluationObjectTargetCycle);

    }

    /**
     * 3-3-09批量查询内容匹配被评对象目标周期[3172]
     * gen by moon at 10/16/2022, 7:13:05 AM
     */
    @Trace(operationName = "3-3-09批量查询内容匹配被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryContMatchEvaObjTargetCycle(BatchQueryContMatchEvaObjTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评对象目标周期平台详情[3176]
     * gen by moon at 3/30/2023, 12:38:38 PM
     */
    @Trace(operationName = "3-3-09查询被评对象目标周期平台详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjTargetCyclePlatformDetail(QueryEvaObjTargetCyclePlatformDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3执行上级目标周期【循环开始】[3197]
     * gen by moon at 10/16/2022, 7:13:07 AM
     */
    @Trace(operationName = "M3执行上级目标周期【循环开始】")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean implementUpTargetCycleLoopStart(List<OmsEvaluationObjectTargetCycle> omsEvaluationObjectTargetCycle) {

        if (omsEvaluationObjectTargetCycle == null || omsEvaluationObjectTargetCycle.size() == 0) {
            return false;
        }

        return super.saveBatch(omsEvaluationObjectTargetCycle.stream().map(item -> {

            return item;
        }).collect(Collectors.toList()));
    }

    /**
     * 3-3-09删除被评对象目标周期[3238]
     * gen by moon at 10/16/2022, 7:13:08 AM
     */
    @Trace(operationName = "3-3-09删除被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean deleteEvaObjTargetCycle(String evaObjTargetCycleId) {

        return super.removeById(evaObjTargetCycleId);
    }

    /**
     * M-构造单条被评对象目标周期验证数据[4243]
     * gen by moon at 10/16/2022, 7:13:10 AM
     */
    @Trace(operationName = "M-构造单条被评对象目标周期验证数据")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public String buildSingleEvaObjTarCyc(OmsEvaluationObjectTargetCycle omsEvaluationObjectTargetCycle) {
        omsEvaluationObjectTargetCycle.setEvaObjTargetCycleId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
        omsEvaluationObjectTargetCycle.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        omsEvaluationObjectTargetCycle.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        if (omsEvaluationObjectTargetCycle != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle() != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            omsEvaluationObjectTargetCycle.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
        }
        if (omsEvaluationObjectTargetCycle != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle() != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle().equals("ARCHIVING")) {
            omsEvaluationObjectTargetCycle.setArchiveInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//ARCHIVE_CURRENT_INDUCTIONID
        }
        omsEvaluationObjectTargetCycle.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        omsEvaluationObjectTargetCycle.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        if (omsEvaluationObjectTargetCycle != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle() != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            omsEvaluationObjectTargetCycle.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
        }
        if (omsEvaluationObjectTargetCycle != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle() != null && omsEvaluationObjectTargetCycle.getSubjectLifeCycle().equals("ARCHIVING")) {
            omsEvaluationObjectTargetCycle.setArchiveTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
        }
        omsEvaluationObjectTargetCycle.setIsValid("FALSE");
        omsEvaluationObjectTargetCycle.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
        omsEvaluationObjectTargetCycle.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
        if (super.save(omsEvaluationObjectTargetCycle)) {
            return omsEvaluationObjectTargetCycle.getEvaObjTargetCycleId();
        } else {
            return "-1";
        }

    }

    /**
     * M3-查询单条被评对象目标周期详情[4291]
     * gen by moon at 9/5/2022, 3:25:54 PM
     */
    @Trace(operationName = "M3-查询单条被评对象目标周期详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @BanAuto
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle querySingleEvaObjTarCycDetail(QuerySingleEvaObjTarCycDetailReq reqDto) {

        try {

            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.ge("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");


            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3-修改被评对象目标周期[4376]
     * gen by moon at 10/16/2022, 7:13:11 AM
     */
    @Trace(operationName = "M3-修改被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateEvaObjTarCyc(OmsEvaluationObjectTargetCycle omsEvaluationObjectTargetCycle) {

        return super.updateById(omsEvaluationObjectTargetCycle);
    }

    /**
     * M3-3-09一键删除所有单条被评对象目标周期验证数据[4422]
     * gen by moon at 10/16/2022, 7:13:12 AM
     */
    @Trace(operationName = "M3-3-09一键删除所有单条被评对象目标周期验证数据")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean autoDeleteSingleEvaObjTarCyc(String evaObjTargetCycleId) {

        return super.removeById(evaObjTargetCycleId);
    }

    /**
     * M3-3-09查询所有单条被评对象目标周期列表[4459]
     * gen by moon at 10/16/2022, 7:13:13 AM
     */
    @Trace(operationName = "M3-3-09查询所有单条被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> querySingleEvaObjTarCycList(QuerySingleEvaObjTarCycListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3执行被评对象目标周期测试【循环开始】[4473]
     * gen by moon at 3/30/2023, 12:38:40 PM
     */
    @Trace(operationName = "M3执行被评对象目标周期测试【循环开始】")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle implementEvaObjTargetCycleLoopStart(ImplementEvaObjTargetCycleLoopStartReq reqDto) {

        try {

            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3批量改被评对象目标周期[4557]
     * gen by moon at 10/16/2022, 7:13:16 AM
     */
    @Trace(operationName = "M3批量改被评对象目标周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchUpdateEvaObjTarCyc(List<OmsEvaluationObjectTargetCycle> omsEvaluationObjectTargetCycle) {

        if (omsEvaluationObjectTargetCycle == null || omsEvaluationObjectTargetCycle.size() == 0) {
            return false;
        }
        return super.saveOrUpdateBatch(omsEvaluationObjectTargetCycle);

    }

    /**
     * M3批量查询被评对象目标周期测试数据[4563]
     * gen by moon at 10/16/2022, 7:13:17 AM
     */
    @Trace(operationName = "M3批量查询被评对象目标周期测试数据")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTarCycTestData(BatchQueryEvaObjTarCycTestDataReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3批量改被评对象目标周期测试数据[4564]
     * gen by moon at 10/16/2022, 7:13:18 AM
     */
    @Trace(operationName = "M3批量改被评对象目标周期测试数据")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchUpdateEvaObjTarCycTestData(List<OmsEvaluationObjectTargetCycle> omsEvaluationObjectTargetCycle) {

        if (omsEvaluationObjectTargetCycle == null || omsEvaluationObjectTargetCycle.size() == 0) {
            return false;
        }
        return super.saveOrUpdateBatch(omsEvaluationObjectTargetCycle);

    }

    /**
     * 3-3-09批量查询被评对象目标周期By周期ID[4726]
     * gen by moon at 10/16/2022, 7:13:19 AM
     */
    @Trace(operationName = "3-3-09批量查询被评对象目标周期By周期ID")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaTargetCycleByCycleId(BatchQueryEvaTargetCycleByCycleIdReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("cycle_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * （111111待确认）3-3-09批量查目标周期匹配被评对象目标周期（by目标周期）[2367]
     * gen by moon at 10/5/2022, 8:51:44 PM
     */
    @Trace(operationName = "（111111待确认）3-3-09批量查目标周期匹配被评对象目标周期（by目标周期）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @BanAuto
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryTargetCycleEvaObjTargetCycle(BatchQueryTargetCycleEvaObjTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("sort_create_time");
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评对象目标周期列表ByCodes[4774]
     * gen by moon at 10/5/2022, 8:52:06 PM
     */
    @Trace(operationName = "3-3-09查询被评对象目标周期列表ByCodes")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @BanAuto
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleListByCodes(BatchQueryEvaObjTargetCycleListByCodesReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_target_cycle_code", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("eva_obj_target_cycle_code");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-9查询进行中被评对象目标周期列表[4836]
     * gen by moon at 10/15/2022, 9:59:32 PM
     */
    @Trace(operationName = "3-3-9查询进行中被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @BanAuto
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryUnderWayEvaObjTargetCycleList(QueryUnderWayEvaObjTargetCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if (reqDto.getCycleStartTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                reqDto.setCycleStartTime(null);
            }
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-9批量查询进行中被评对象目标周期列表[5012]
     * gen by moon at 10/27/2022, 5:08:56 AM
     */
    @Trace(operationName = "3-3-9批量查询进行中被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @BanAuto
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryUnderWayEvaObjTargetCycle(BatchQueryUnderWayEvaObjTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());

            if (reqDto.getCycleStartTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                reqDto.setCycleStartTime(null);
            }
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3查询部门目标任务树测试列表[5124]
     * gen by moon at 11/18/2022, 7:24:31 PM
     */
    @Trace(operationName = "M3查询部门目标任务树测试列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryDeptObjTreeTestDataList(QueryDeptObjTreeTestDataListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09模糊查询被评对象目标周期列表[5229]
     * gen by moon at 1/25/2023, 1:58:42 PM
     */
    @Trace(operationName = "3-3-09模糊查询被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> vagueQueryEvaObjTargetCycle(VagueQueryEvaObjTargetCycleReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            // TODO: 2023/5/29 右模糊代码 
            queryWrapper.likeRight("eva_obj_target_cycle_code", reqDto.getEvaObjTargetCycleCode());
            queryWrapper.orderByAsc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标周期详情by周期时间[5271]
     * gen by moon at 3/30/2023, 12:38:41 PM
     */
    @Trace(operationName = "3-3-09查询目标周期详情by周期时间")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjTargetCycleByCycleTimeDetail(QueryEvaObjTargetCycleByCycleTimeDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询内容匹配被评对象目标周期列表[5394]
     * gen by moon at 12/4/2022, 3:59:48 AM
     */
    @Trace(operationName = "3-3-09查询内容匹配被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryContMatchEvaObjTargetCycleList(QueryContMatchEvaObjTargetCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("relative_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询右模糊被评对象目标周期列表[5529]
     * gen by moon at 1/13/2023, 6:53:12 PM
     */
    @Trace(operationName = "3-3-09查询右模糊被评对象目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryRightVagueEvaObjTargetCycleList(QueryRightVagueEvaObjTargetCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            // TODO: 2023/5/29 手写右模糊代码
            if (reqDto.getEvaObjTargetCycleCode() != null) {
                queryWrapper.likeRight("eva_obj_target_cycle_code", reqDto.getEvaObjTargetCycleCode());
                reqDto.setEvaObjTargetCycleCode(null);
            }

            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            // TODO: 2023/6/12 特殊排序，手写代码 
            queryWrapper.orderByAsc(CommonFunctionHelper.buildSpecOderBy("eva_obj_target_cycle_code"));
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查询被评对象目标周期列表By目标内容Ids[5396]
     * gen by moon at 5/8/2025, 8:52:14 PM
     */
    @Trace(operationName = "3-3-09批量查询被评对象目标周期列表By目标内容Ids")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleListByIds(BatchQueryEvaObjTargetCycleListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("target_tree_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标周期（标识排序）列表[5731]
     * gen by moon at 1/19/2023, 3:49:10 AM
     */
    @Trace(operationName = "3-3-09查询目标周期（标识排序）列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    @BanAuto
    public List<OmsEvaluationObjectTargetCycle> queryTargetCycleCodeOrderList(QueryTargetCycleCodeOrderListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            // TODO: 2023/5/29 右模糊代码代码
            if (reqDto.getEvaObjTargetCycleCode() != null) {
                queryWrapper.likeRight("eva_obj_target_cycle_code", reqDto.getEvaObjTargetCycleCode());
                reqDto.setEvaObjTargetCycleCode(null);
            }

            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            reqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            // TODO: 2023/6/12 特殊排序，手写代码
            queryWrapper.orderByDesc(CommonFunctionHelper.buildSpecOderBy("eva_obj_target_cycle_code"));
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3查询目标周期（标识排序）测试列表[5944]
     * gen by moon at 2/19/2023, 1:36:19 PM
     */
    @Trace(operationName = "M3查询目标周期（标识排序）测试列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    @BanAuto
    public List<OmsEvaluationObjectTargetCycle> queryTargetCycleCodeOrderTestList(QueryTargetCycleCodeOrderTestListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            queryWrapper.likeRight("eva_obj_target_cycle_code", fieldInfoMap.get("eva_obj_target_cycle_code"));
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3查询被评对象目标周期测试数据详情[5990]
     * gen by moon at 3/30/2023, 12:38:43 PM
     */
    @Trace(operationName = "M3查询被评对象目标周期测试数据详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjTarCycTestDataDetail(QueryEvaObjTarCycTestDataDetailReq reqDto) {

        try {

            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查目标内容目标周期（标识排序）列表ByIds[6095]
     * gen by moon at 3/17/2023, 9:52:03 PM
     */
    @Trace(operationName = "3-3-09批量查目标内容目标周期（标识排序）列表ByIds")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleCodeOrderListByIds(BatchQueryEvaObjTargetCycleCodeOrderListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_target_cycle_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3查询被评对象目标周期列表测试[6221]
     * gen by moon at 4/16/2024, 7:02:35 PM
     */
    @Trace(operationName = "M3查询被评对象目标周期列表测试")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaObjTarCycList(QueryEvaObjTarCycListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3查询平台目标周期测试列表[6258]
     * gen by moon at 4/15/2023, 1:10:06 AM
     */
    @Trace(operationName = "M3查询平台目标周期测试列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryPlartFormEvaObjTarCycTestList(QueryPlartFormEvaObjTarCycTestListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标周期列表（开始小于等于&结束大于等于）[6507]
     * gen by moon at 4/16/2024, 7:02:37 PM
     */
    @Trace(operationName = "3-3-09查询目标周期列表（开始小于等于&结束大于等于）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaObjTargetCycleByCycleTimeList(QueryEvaObjTargetCycleByCycleTimeListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.ge("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查目标子周期By开始与结束时间[6551]
     * gen by moon at 5/13/2023, 9:11:16 PM
     */
    @Trace(operationName = "3-3-09查目标子周期By开始与结束时间")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryTargetCycleByStartAndEndTimeDetail(QueryTargetCycleByStartAndEndTimeDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
// TODO: 2023/5/14
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.ge("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09执行内容匹配目标周期by标识排序[6573]
     * gen by moon at 5/11/2023, 4:26:22 AM
     */
    @Trace(operationName = "3-3-09执行内容匹配目标周期by标识排序")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> implementContentMatchTargetCycleCodeOrder(ImplementContentMatchTargetCycleCodeOrderReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标周期信息详情[6874]
     * gen by moon at 5/21/2023, 6:25:36 AM
     */
    @Trace(operationName = "3-3-09查询目标周期信息详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryTargetCycleInfoDetail(QueryTargetCycleInfoDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查目标周期by目标内容排序列表[7227]
     * gen by moon at 6/21/2023, 3:24:29 AM
     */
    @Trace(operationName = "3-3-09查目标周期by目标内容排序列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryTargetCycleByContOrderList(QueryTargetCycleByContOrderListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("relative_order_number");
            queryWrapper.orderByDesc("sort_create_time");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查目标周期（标识排序小到大）列表[7584]
     * gen by moon at 10/21/2023, 3:16:17 PM
     */
    @Trace(operationName = "3-3-09查目标周期（标识排序小到大）列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryTargetCycleCodeOrderStoMaxList(QueryTargetCycleCodeOrderStoMaxListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3查右模糊目标周期测试列表[7850]
     * gen by moon at 11/9/2023, 10:14:32 PM
     */
    @Trace(operationName = "M3查右模糊目标周期测试列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryRightVagueTargetCycleTestList(QueryRightVagueTargetCycleTestListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评对象目标周期（内容与周期从大到小）列表[8595]
     * gen by moon at 3/14/2024, 3:16:47 AM
     */
    @Trace(operationName = "3-3-09查询被评对象目标周期（内容与周期从大到小）列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaObjTargetCycleByContAndCycleBigtoSmallList(QueryEvaObjTargetCycleByContAndCycleBigtoSmallListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            // TODO: 2024/4/10
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.ge("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc(CommonFunctionHelper.buildSpecOderBy("eva_obj_target_cycle_code"));
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询大屏被评对象目标周期详情（开始时间大于等于&结束时间小于等于）[8952]
     * gen by moon at 5/17/2024, 11:08:02 PM
     */
    @Trace(operationName = "3-3-09查询大屏被评对象目标周期详情（开始时间大于等于&结束时间小于等于）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryDashboardEvaObjTargetCycleDetail(QueryDashboardEvaObjTargetCycleDetailReq reqDto) {

        try {

            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            // TODO: 2024/5/17
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.ge("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.le("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查询被评对象目标周期By内容ID[9052]
     * gen by moon at 4/2/2024, 6:12:19 PM
     */
    @Trace(operationName = "3-3-09批量查询被评对象目标周期By内容ID")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryEvaObjTargetCycleByContId(BatchQueryEvaObjTargetCycleByContIdReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查询目标周期By主键[9069]
     * gen by moon at 4/2/2024, 6:12:21 PM
     */
    @Trace(operationName = "3-3-09批量查询目标周期By主键")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryTargetCycleByEntity(BatchQueryTargetCycleByEntityReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_target_cycle_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标工作周期列表[9275]
     * gen by moon at 4/5/2024, 8:57:33 PM
     */
    @Trace(operationName = "3-3-09查询目标工作周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryTargetWorkCycleList(QueryTargetWorkCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标内容周期详情[9285]
     * gen by moon at 4/5/2024, 8:57:37 PM
     */
    @Trace(operationName = "3-3-09查询目标内容周期详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryTargetContetCycleDetail(QueryTargetContetCycleDetailReq reqDto) {

        try {

            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标内容周期列表[9295]
     * gen by moon at 4/6/2024, 11:07:26 AM
     */
    @Trace(operationName = "3-3-09查询目标内容周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryTargetContetCycleList(QueryTargetContetCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评对象目标周期By开始大于结束小于详情[9356]
     * gen by moon at 4/7/2024, 3:12:29 PM
     */
    @Trace(operationName = "3-3-09查询被评对象目标周期By开始大于结束小于详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjTargetCycleByStartBigEndSmallDetail(QueryEvaObjTargetCycleByStartBigEndSmallDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评目标周期列表[9415]
     * gen by moon at 7/22/2024, 6:13:32 PM
     */
    @Trace(operationName = "3-3-09查询被评目标周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryEvaTargetCycleList(QueryEvaTargetCycleListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("target_tree_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评对象目标周期详情（开始小于等于结束时间大于等于）[9460]
     * gen by moon at 4/30/2024, 1:48:04 AM
     */
    @Trace(operationName = "3-3-09查询被评对象目标周期详情（开始小于等于结束时间大于等于）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjTargetCycleEqualStartAndGreaterDetail(QueryEvaObjTargetCycleEqualStartAndGreaterDetailReq reqDto) {

        try {

            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            // TODO: 2024/4/10
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {
                queryWrapper.le("cycle_start_time", reqDto.getCycleStartTime());
                queryWrapper.ge("cycle_end_time", reqDto.getCycleEndTime());
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());


            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询被评对象目标周期详情(按评价模板创建时间排序)[9462]
     * gen by moon at 4/30/2024, 1:48:08 AM
     */
    @Trace(operationName = "3-3-09查询被评对象目标周期详情(按评价模板创建时间排序)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsEvaluationObjectTargetCycle queryEvaObjectTargetCycleByCreateTimeDetail(QueryEvaObjectTargetCycleByCreateTimeDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsEvaluationObjectTargetCycle> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsEvaluationObjectTargetCycle retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查询目标周期by内容标识[9589]
     * gen by moon at 5/17/2024, 1:50:57 AM
     */
    @Trace(operationName = "3-3-09批量查询目标周期by内容标识")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryTargetCycleByContentCodes(BatchQueryTargetCycleByContentCodesReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("eva_obj_target_cycle_code", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("eva_obj_target_cycle_code");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标周期by内容排序从小到大列表[9593]
     * gen by moon at 5/17/2024, 1:50:59 AM
     */
    @Trace(operationName = "3-3-09查询目标周期by内容排序从小到大列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryTargetCycleByOrderNumFormSmallToLagList(QueryTargetCycleByOrderNumFormSmallToLagListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("relative_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09查询目标周期（内容排序）列表[9907]
     * gen by moon at 7/1/2024, 1:42:31 AM
     */
    @Trace(operationName = "3-3-09查询目标周期（内容排序）列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> queryTargetCycleByOrderNumList(QueryTargetCycleByOrderNumListReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("target_tree_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09批量查询目标周期By目标内容[10155]
     * gen by moon at 8/21/2024, 11:24:02 PM
     */
    @Trace(operationName = "3-3-09批量查询目标周期By目标内容")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> batchQueryTargetCycleByTargetCont(BatchQueryTargetCycleByTargetContReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("sort_create_time");
            queryWrapper.orderByDesc("order_number");
            queryWrapper.orderByAsc("target_tree_order_number");
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-3-09执行批量查目标周期By内容ID（时间范围切）[10244]
     * gen by moon at 9/25/2024, 9:46:57 PM
     */
    @Trace(operationName = "3-3-09执行批量查目标周期By内容ID（时间范围切）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsEvaluationObjectTargetCycle> implementBatchQueryByContIdTimeSection(ImplementBatchQueryByContIdTimeSectionReq reqDto) {

        try {
            QueryWrapper<OmsEvaluationObjectTargetCycle> queryWrapper = new QueryWrapper<>();

            if (reqDto.getEvaObjTargetCycleList() == null || reqDto.getEvaObjTargetCycleList().isEmpty()) {
                return new ArrayList<>();
            }

            // TODO: 2024/4/10
            if (reqDto.getCycleStartTime() != null && reqDto.getCycleEndTime() != null) {

                queryWrapper.nested(wrapper ->
                        wrapper.le("cycle_start_time", reqDto.getCycleStartTime()).ge("cycle_end_time", reqDto.getCycleStartTime())
                                .or()
                                .le("cycle_end_time", reqDto.getCycleEndTime()).ge("cycle_end_time", reqDto.getCycleEndTime())
                                .or()
                                .ge("cycle_start_time", reqDto.getCycleStartTime()).le("cycle_end_time", reqDto.getCycleEndTime())
                );
                reqDto.setCycleStartTime(null);
                reqDto.setCycleEndTime(null);
            }
            queryWrapper.in("target_cycle_content_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsEvaluationObjectTargetCycle.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsEvaluationObjectTargetCycle.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsEvaluationObjectTargetCycle>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

}
